package com.sky.mapper;

import com.sky.entity.ArticleSort;
import com.sky.entity.User;
import com.sky.vo.ArticleSortVO;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ArticleSortMapper{

    @Select("select * from article_sort")
    List<ArticleSortVO> selectArticleSort();

    ArticleSortVO selectArticleSortBy(ArticleSort articleSort);

    @Insert("insert into article_sort (article_Sort_title,create_time,update_time) values (#{articleSortTitle},#{createTime},#{updateTime})")
    void insertArticleSort(ArticleSort articleSort);

    @Update("update article_sort set article_sort_title = #{articleSortTitle},update_time = #{updateTime} where id=#{id}")
    void updateArticleSort(ArticleSort articleSort);

    @Delete("delete from article_sort where id = #{id}")
    void deleteArticleSort(Long id);
}
